﻿#ifndef WRWORKSTATUSPIXMAPS
#define WRWORKSTATUSPIXMAPS

#include "QPixmap"
#include "QString"

//表示工作状态图标信息。
class WRWorkStatusPixmaps
{
private:
    QPixmap m_unavail;
    QPixmap m_closed;
    QPixmap m_opening;
    QPixmap m_ready;
    QPixmap m_stopped;
    QPixmap m_starting;
    QPixmap m_running;
    QPixmap m_stopping;
    QPixmap m_blocked;
    QPixmap m_closing;
    QPixmap m_disposing;
    QPixmap m_disposed;
    QPixmap m_unknown;

    Q_DISABLE_COPY(WRWorkStatusPixmaps)

    //初始化
    WRWorkStatusPixmaps() :
        m_unavail(QStringLiteral(":/WRSoft-GuiApp-Working-Common/workLampUnavail.png")),
        m_closed(QStringLiteral(":/WRSoft-GuiApp-Working-Common/workLampClosed.png")),
        m_opening(QStringLiteral(":/WRSoft-GuiApp-Working-Common/workLampOpening.png")),
        m_ready(QStringLiteral(":/WRSoft-GuiApp-Working-Common/workLampReady.png")),
        m_stopped(QStringLiteral(":/WRSoft-GuiApp-Working-Common/workLampStopped.png")),
        m_starting(QStringLiteral(":/WRSoft-GuiApp-Working-Common/workLampStarting.png")),
        m_running(QStringLiteral(":/WRSoft-GuiApp-Working-Common/workLampRunning.png")),
        m_stopping(QStringLiteral(":/WRSoft-GuiApp-Working-Common/workLampStopping.png")),
        m_blocked(QStringLiteral(":/WRSoft-GuiApp-Working-Common/workLampBlocked.png")),
        m_closing(QStringLiteral(":/WRSoft-GuiApp-Working-Common/workLampClosing.png")),
        m_disposing(QStringLiteral(":/WRSoft-GuiApp-Working-Common/workLampDisposing.png")),
        m_disposed(QStringLiteral(":/WRSoft-GuiApp-Working-Common/workLampDisposed.png")),
        m_unknown(QStringLiteral(":/WRSoft-GuiApp-Working-Common/workLampUnknown.png"))
    {
        //add code here
    }

    //获取默认值。
    inline static const WRWorkStatusPixmaps& value()
    {
        static WRWorkStatusPixmaps val;
        return val;
    }

public:
    inline static const QPixmap& unavail()
    {
        const WRWorkStatusPixmaps& val = value();
        return val.m_unavail;
    }
    inline static const QPixmap& closed()
    {
        const WRWorkStatusPixmaps& val = value();
        return val.m_closed;
    }
    inline static const QPixmap& opening()
    {
        const WRWorkStatusPixmaps& val = value();
        return val.m_opening;
    }
    inline static const QPixmap& ready()
    {
        const WRWorkStatusPixmaps& val = value();
        return val.m_ready;
    }
    inline static const QPixmap& stopped()
    {
        const WRWorkStatusPixmaps& val = value();
        return val.m_stopped;
    }
    inline static const QPixmap& starting()
    {
        const WRWorkStatusPixmaps& val = value();
        return val.m_starting;
    }
    inline static const QPixmap& running()
    {
        const WRWorkStatusPixmaps& val = value();
        return val.m_running;
    }
    inline static const QPixmap& stopping()
    {
        const WRWorkStatusPixmaps& val = value();
        return val.m_stopping;
    }
    inline static const QPixmap& blocked()
    {
        const WRWorkStatusPixmaps& val = value();
        return val.m_blocked;
    }
    inline static const QPixmap& closing()
    {
        const WRWorkStatusPixmaps& val = value();
        return val.m_closing;
    }
    inline static const QPixmap& disposing()
    {
        const WRWorkStatusPixmaps& val = value();
        return val.m_disposing;
    }
    inline static const QPixmap& disposed()
    {
        const WRWorkStatusPixmaps& val = value();
        return val.m_disposed;
    }
    inline static const QPixmap& unknown()
    {
        const WRWorkStatusPixmaps& val = value();
        return val.m_unknown;
    }
};

#endif // WRWORKSTATUSPIXMAPS

